def ez(c):
    for i in range(2, int(c**0.5)+1):
        if c%i == 0:
            break
    else:
            return(c)
            print("Простые")
a=list(input().split())
b=['zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine']
s=0
p1=0
for i in a:
    if i not in b:
        print ("Wrong input")
        break
for j in range(10):
    if a[0] == b[j]:
        s+=j*100
    if a[1] == b[j]:
        s+=j*10
    if a[2] == b[j]:
        s+=j
        print(s)
